import { ref } from "vue"
import { listNode } from "../../../api/manage/node"
import { loadAllParams } from "../../../api/page"

export const useNode = () => {
  const nodeList = ref([])

  const getNodeList = async () => {
    const { rows } = await listNode(loadAllParams)
    nodeList.value = rows
  }

  onMounted(() => {
    getNodeList()
  })

  return {
    nodeList
  }
}